package com.su.edu.api.model.req;

import com.su.edu.common.model.ValidGroup.InsertGroup;
import com.su.edu.common.model.ValidGroup.UpdateGroup;
//import jakarta.validation.constraints.NotEmpty;
//import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;


/**
 * @author wangjun
 * @since 2024/6/5 14:06
 */
@Data
public class UserReq {
//    @NotNull(message = "学生id不能为空", groups = {UpdateGroup.class})
    private Long id;

//    @NotEmpty(message = "学生姓名不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    @Length(max = 50, min = 1, message = "学生姓名长度在[1~50]", groups = {InsertGroup.class, UpdateGroup.class})
    private String name;

    @Range(max = 150, message = "学生姓名年龄必须在[0~150]", groups = {InsertGroup.class, UpdateGroup.class})
    private Integer age;

    private String email;
}
